<tagLib name="html" />

<include file="Public:header" />

<div class="container" id="cpcontainer">
    <div class="itemtitle">
        <h3>{$Think.lang.medal.manage_medal}</h3>
        <ul class="tab1">
            <li class="current"><a href="__URL__/medalList"><span>{$Think.lang.medal.all_medal}</span></a></li>
            <li><a href="__URL__/approveMedal"><span>{$Think.lang.medal.approve_medal}</span></a></li>
        </ul>
    </div>
    <p class="tips">{$Think.lang.medal.medal_tips}</p>
    <form name="cpform" method="post" action="__URL__/manageMedal" id="cpform" >
    <input type="hidden" name="op" value="save" />
    <table class="tb tb2 ">
        <tr>
            <th class="td23">{$Think.lang.enable}</th>
            <th class="td28">{$Think.lang.display_order}</th>
            <th class="td25"></th>
            <th>{$Think.lang.name}</th>
            <th>{$Think.lang.medal.medal_image}</th>
            <th>{$Think.lang.medal.award_type}</th>
            <th class="td23">{$Think.lang.actions}</th>
            <th>{$Think.lang.mark}</th>
        </tr>
        <volist name="medalList" id="vo">
        <tr>
            <td class="td25"><input class="checkbox" type="checkbox" name="status[{$vo.medal_id}]" value="1" <eq name="vo.status" value="1">checked</eq> /></td>
            <td class="td28"><input type="text" class="txt" size="3" name="display_order[{$vo.medal_id}]" value="{$vo.display_order}"></td>
            <td class="td25"><img src="__PUBLIC__/Images/Medals/{$vo.image}"></td>
            <td><input type="text" class="txt" size="10" name="name[{$vo.medal_id}]" value="{$vo.name}"></td>
            <td><input type="text" class="txt" size="20" name="image[{$vo.medal_id}]" value="{$vo.image}"></td>
            <td><eq name="vo.award_type" value="1">{$Think.lang.medal.award_by_admin}<else/><a href="#" title="{$Think.lang.medal.medal_expression}: {$vo.permission|Input::forShow}">{$Think.lang.medal.award_by_application}</a></eq></td>
            <td><a class="act" href="__URL__/editMedal/medal_id/{$vo.medal_id}" class="act">{$Think.lang.edit}</a></td>
            <td width="10%"><input class="checkbox" type="checkbox" name="mods[]" value="{$vo.medal_id}"></td>
        </tr>
        </volist>
        <tr>
            <td></td>
            <td colspan="7"><div><a href="###" onclick="addrow(this, 0)" class="addtr">{$Think.lang.medal.add_medal}</a></div></td>
        </tr>
        <tr class="nobg">
            <td colspan="7"><div class="fixsel right"><input type="submit" class="btn" name="medalsubmit" value="{$Think.lang.submit}" /></div></td>
            <td><input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll('prefix', this.form, 'mods')" /><label for="chkall">{$Think.lang.delete}?</label></td>
        </tr>
    </table>
    </form>
</div>

<script type="text/JavaScript">
var rowtypedata = [
    [
        [1,'<input type="checkbox" class="checkbox" name="new_status[]" value="1" checked="true">', 'td25'],
        [1,'<input type="text" class="txt" name="new_display_order[]" size="3">', 'td28'],
        [1,'', 'td25'],
        [1,'<input type="text" class="txt" name="new_name[]" size="10">'],
        [1,'<input type="text" class="txt" name="new_image[]" size="20">'],
        [1,'', 'td23'],
        [1,'', 'td23'],
        [1,'', 'td25']
    ]
];
</script>

<include file="Public:footer" />
